<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
  <title>CGU - Crypto</title>
  <link rel="stylesheet" type="text/css" href="main.css" />
</head>

<body>

<div id="head">
  <div id="title">
    <h1>CGU</h1>&nbsp;&nbsp;<h2>Common &amp; General Use JavaScript</h2>
  </div>
</div>

<div id="foot">
  <div id="copy">
    <span>&copy; 2008 CGU</span>
  </div>
</div>

<div id="body">
  <div id="nav">
    <div class="pad">
      
      <div class="navlist">
        <h3>CGU</h3>
        <ul>
          <li><a href="index.html">Docs Home</a></li>
          <li><a href="functions.html">Functions</a></li>
        </ul>
      </div>
      
      <div class="navlist">
        <h3>Crypto</h3>
        <ul>
          <li><a href="function.hash.html">hash</a></li>
          <li><a href="function.hashes.html">hashes</a></li>
        </ul>
      </div>
      
      <div class="navlist">
        <h3>Utilities</h3>
        <ul>
          <li><a href="utility.Cookie.html">Cookie</a></li>
          <li class="active"><a href="utility.Crypto.html">Crypto</a></li>
          <li><a href="utility.JSON.html">JSON</a></li>
          <li><a href="utility.Query.html">Query</a></li>
          <li><a href="utility.Time.html">Time</a></li>
          <li><a href="utility.Type.html">Type</a></li>
        </ul>
      </div>
      
    </div>
  </div>
  
  <div id="docs">
    <div class="pad">
      <div id="content">
<!-- Start: Content -->
      
      <h1>Crypto</h1>
      
      <blockquote>
        <p>Crypto adds <a href="http://wikipedia.org/wiki/Cryptographic_hash_function">cryptographic hash functions</a> to JavaScript.</p>
        
        <p>It's designed to be simple to use, allowing 1-way and HMAC hashing through the use of a single function.</p>
      </blockquote>
      
      <hr />
      
      <h3>Functions</h3>
      
      <h4><a href="function.hash.html">hash</a></h4>
      <blockquote>
        <p>Generate a cryptographic hash of given data.</p>
      </blockquote>
      
      <h4><a href="function.hashes.html">hashes</a></h4>
      <blockquote>
        <p>Get a list of all available hash algorithms.</p>
      </blockquote>
      
      <hr />
      
      <h3>Encoding</h3>
      
      <blockquote>
        <p>Base-16, Base-32, and Base-64 are based on <a href="http://www.ietf.org/rfc/rfc4648.txt">RFC 4648</a>.</p>
      </blockquote>
      
      <h4>Base-16</h4>
      <blockquote>
        <h5>base16</h5>
        <blockquote>
          <p>Uppercase hexadecimal <code>(0-9 A-F)</code>.</p>
        </blockquote>
        
        <h5>hex</h5>
        <blockquote>
          <p>Lowercase hexadecimal <code>(0-9 a-f)</code>.</p>
        </blockquote>
      </blockquote>
      
      <h4>Base-32</h4>
      <blockquote>
        <h5>base32</h5>
        <blockquote>
          <p>Standard Base-32 <code>(A-Z 2-7)</code>.</p>
        </blockquote>
        
        <h5>base32hex</h5>
        <blockquote>
          <p>Hexadecimal Base-32 <code>(0-9 a-v)</code>.</p>
        </blockquote>
      </blockquote>
      
      <h4>Base-64</h4>
      <blockquote>
        <h5>base64</h5>
        <blockquote>
          <p>Standard Base-64 <code>(A-Z a-z 0-9 + /)</code>.</p>
        </blockquote>
        
        <h5>base64url</h5>
        <blockquote>
          <p>URL Alternative <code>(A-Z a-z 0-9 - _)</code>.</p>
        </blockquote>
      </blockquote>
      
      <h4>Other</h4>
      <blockquote>
        <h5>raw</h5>
        <blockquote>
          <p>Returns a byte array of the hash <code>(e.g., [0x00, 0xff, ...])</code>.</p>
        </blockquote>
        
        <h5>str</h5>
        <blockquote>
          <p>Returns an 8-bit encoded string via <code>String.fromCharCode</code>.</p>
        </blockquote>
      </blockquote>
      
      <hr />
      
<!-- Final: Content -->
      </div>
    </div>
  </div>
</div>

  <script type="text/javascript" src="main.js"></script>
</body>

</html>
